/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package beans;

import control.Controller;
import interfaces.Constanst;
import java.util.ArrayList;
import javax.ejb.Stateless;
import model.Cluster;
import model.Host;

/**
 *
 * @author william
 */
@Stateless
public class Operations implements OperationsRemote {
    Controller controller = new Controller();

    @Override
    public Cluster clusterMachines() {
        controller.createFile(Constanst.fileName);
        Cluster c = controller.clusterAllData().get(0);
        return c;
    }
    @Override
    public ArrayList<String> ipsList() {
        ArrayList<String> list;
        controller.createFile(Constanst.fileName);
        Cluster c = controller.clusterAllData().get(0);
        list=controller.ipList(c.getHostList());
        return list;
    }   
    
}
